<!--
 * @Description: 布局
 * @Author: rendc
 * @Date: 2025-05-08 11:18:05
 * @LastEditors: rendc
 * @LastEditTime: 2025-05-08 11:39:17
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>布局</title>
</head>
<style>
  /* 清除默认布局 */
  *{
    margin: 0;
    padding: 0;
  }
  div{
    /* 盒子模型改为边框盒子 */
    box-sizing: border-box;
    font-size: 26px;
    color: red;
    font-weight: 700;
    text-align: center;
    font-style: italic;
  }
  .main{
    border: 1px solid red;
    /* 设置页面宽高为视口宽高 */
    width: 100vw;
    height: 100vh;
  }
  .header{
    border: 1px solid red;
    width: 100%;
    height: 10%;
  }
  .content{
    border: 1px solid red;
    width: 100%;
    height: 80%;
  }
  .contentLeft,.contentRight{
    border: 1px solid black;
    display: inline-block;
    height: 100%;
  }
  .contentLeft{
    background-color: greenyellow;
    width: 30%;
  }
  .contentRight{
    background-color: skyblue;
    width: 70%;
  }
  /* .up,.down{
    border: 1px solid hotpink;
    height: 50%;
  } */
  .footer{
    border: 1px solid red;
    width: 100%;
    height: 10%;
  }
</style>
<body>
  <div class="main">
    <div class="header">
      header
    </div>
    <div class="content">
      <div class="contentLeft">left</div><div class="contentRight">right
        <!-- <div class="up">up</div>
        <div class="down">down</div> -->
      </div>
    </div>
    <div class="footer">
      footer
    </div>
  </div>
</body>
</html>